package com.waidi.clothespad.common;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import com.waidi.clothespad.ClothesMainActivity;

public class BootCompletedReceiver extends BroadcastReceiver {
    public static final String TAG = "BootCompletedReceiver";
    public static int m = 1;

    @Override
    public void onReceive(Context context, Intent intent) {
        if(intent.getAction().equals(intent.ACTION_BOOT_COMPLETED))
        {
            //广播注册 开机启动，
            Intent newIntent = new Intent(context, ClothesMainActivity.class);
            newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(newIntent);
            Log.i(TAG,"app boot action");
        }
       // context.unregisterReceiver(this);//A33 去掉 KuBi 加上


    }
}
